www.gusucode.com > 中国货源网导航程序源码 1 > 中国货源网导航程序源码 1.0/8月11日备份/admin/admin_detail_add.asp
<!--#include file="mdb.asp"--> <!--#include file="aq.asp"--> <% if session("adminlogin")<>sessionvar then Response.Write("<script language=javascript>alert('你尚未登录,或者超时了!请重新登录');this.location.href='index.asp';</script>") Response.End End if dim action,title,url,leibie,memo,topid,links,zhang title=request("title") url=request("url") leibie=request("leibie") topid=request("topid") memo=request("memo") links=request("links") zhang=request("zhang") yl_time=now() yl_intime=now() action=request("action") if action="add" then if title="" or url="" or leibie="" then Response.Write ("<script language=javascript>alert('表单不完整!');this.location.href='admin_detail_add.asp';</script>") else set r=server.createobject("adodb.recordset") r.open "select * from detail where title='"&title&"'",conn,1,3 r.addnew r("title")=title r("url")=url r("topid")=topid r("links")=links r("zhang")=1 r("yl_time")=now() r("yl_intime")=now() if memo="" then r("memo")=" "&memo else r("memo")=memo end if r("classid")=leibie r("verity")=1 r.update r.close set r=nothing Response.Write ("<script language=javascript>alert('新网站添加成功!');this.location.href='admin_detail_add.asp';</script>") Response.End end if end if %> <HTML> <HEAD> <TITLE>网站添加管理</TITLE> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <LINK REL="stylesheet" HREF="css.css" TYPE="text/css"> </HEAD> <% dim rs(5) function listunder(i) set rs(i)=server.createobject("adodb.recordset") rs(i).open "select classid,classname,verity from feilei where topclass="&rs(i-1)("classid"),conn,1,3 while not rs(i).eof dim topclassname topclassname="" for x=0 to i-1 topclassname=topclassname&rs(x)("classname")&">" next fujia="" if rs(i)("verity")<>1 then fujia="(未审核)" response.write "<option value='"&rs(i)("classid")&"'>"&topclassname&rs(i)("classname")&fujia&"</option>"&vbCrLf if i<Ubound(rs) then call listunder(i+1) end if rs(i).movenext wend end function %> <BODY> <table width="96%" border="0" cellspacing="1" cellpadding="8" align="center" bgcolor="#999999"> <tr> <td bgcolor="#cccccc" align="center"> 网站添加管理</td> </tr> <tr> <td bgcolor="#eeeeee"> <br> <form action="admin_detail_add.asp" method="post" name="form1"> 网站标题:<input name="title"><br> 网站地址:<input name="url" size="35"><br> 类别名称:<select name="leibie"> <option selected value="0">请选择分类</option> <% set rs(0)=server.createobject("adodb.recordset") rs(0).open "select classid,classname,verity from feilei where topclass=0",conn,1,3 while not rs(0).eof fujia="" if rs(0)("verity")<>1 then fujia="(未审核)" response.write "<option value='"&rs(0)("classid")&"'>"&rs(0)("classname")&fujia&"</option>"&vbCrLf call listunder(1) rs(0).movenext wend %> </select><br> 推荐级别:<input name="topid" size="10"> 0-100,数字越大,排名越靠前<br> 友情显示:<select name="links" id="links"> <option value="0">不显示</option> <option value="1">显示</option></select> 是否作为友情连接显示<BR> 其他信息:<input name="memo" size="50"><br> <input type="hidden" name="action" value="add"> <input type="submit" value="添加新网站"> </form> <br><br> </td> </tr> </table> </BODY> </HTML>